﻿/*
 * Copyright (c) 2020-2025, Qingdao Digital Intelligent Ship & Ocean Technology Co., Ltd.
 * All rights reserved.
 *
 * This file is part of FastCAE and is distributed under the terms of the
 * BSD 3-Clause License. See the LICENSE file in the project root for details.
 */

/**
 *
 * @file    PrimitivesBox.h
 * @brief   Box Python接口封装
 * @author  fulipeng (fulipengqd@yeah.net)
 * @date    2024-10-23
 *
 */

#ifndef  __PYINTERFACE_PRIMITIVESBOX_H___
#define  __PYINTERFACE_PRIMITIVESBOX_H___

#include <QString>
#include <QObject>
#include <QVariantMap>
#include "WrapperDataObject.h"
#include "WrapperTools.h"
#include "PythonInterfaceAPI.h"

namespace Interface
{
    class FITKAbsGeoCommand;
    class FITKGeoCommandList;
    class FITKAbsGeoModelBox;
}

/**
 * @brief   Box数据封装类
 * @author  fulipeng (fulipengqd@yeah.net)
 * @date    2024-10-23
 */
class Box : public WrapperDataObject
{
public:
    explicit Box(int id = 0);
    explicit Box(Interface::FITKAbsGeoModelBox* box);
    virtual ~Box() = default;

    /**
     * @brief   获取类名
     * @author  fulipeng (fulipengqd@yeah.net)
     * @date    2024-10-24
     */
    virtual const QString getClassName() override;

    /**
     * @brief   设置第一点数据
     * @param   p1[3] xyz
     * @author  fulipeng (fulipengqd@yeah.net)
     * @date    2024-10-24
     */
    bool setPoint1(QList<double> p1);

    /**
     * @brief   设置第二点数据
     * @param   p1[3] xyz
     * @author  fulipeng (fulipengqd@yeah.net)
     * @date    2024-10-24
     */
    bool setPoint2(QList<double> p2);

    /**
     * @brief   设置长宽高数据
     * @param   p1[3] Length Width Height
     * @author  fulipeng (fulipengqd@yeah.net)
     * @date    2024-10-24
     */
    bool setDimensions(QList<double> dimensions);

private:
    /**
     * @brief   装饰数据对象
     * @author  fulipeng (fulipengqd@yeah.net)
     * @date    2024-10-23
     */
    Interface::FITKAbsGeoModelBox* m_box{};
};

/**
 * @brief   Box数据装饰器类
 * @author  fulipeng (fulipengqd@yeah.net)
 * @date    2024-10-23
 */
class PythonInterfaceAPI BoxWrapper : public WrapperDataObjectWrapper
{
    Q_OBJECT
public:
    explicit BoxWrapper() = default;
    virtual ~BoxWrapper() = default;

public slots:

    /**
     * @brief   新建装饰数据对象
     * @author  fulipeng (fulipengqd@yeah.net)
     * @date    2024-10-24
     */
    Box* new_Box();

    /**
     * @brief   销毁装饰数据对象
     * @author  fulipeng (fulipengqd@yeah.net)
     * @date    2024-10-24
     */
    void delete_Box(Box* obj);

    /**
     * @brief   销毁装饰数据对象
     * @author  fulipeng (fulipengqd@yeah.net)
     * @date    2024-10-24
     */
    void deleteCmd(Box* obj);

    /**
     * @brief   设置第一点数据
     * @param   obj
     * @param   p1[3] xyz
     * @author  fulipeng (fulipengqd@yeah.net)
     * @date    2024-10-24
     */
    void setPoint1(Box* obj, QList<double> p1);

    /**
     * @brief   设置第二点数据
     * @param   obj
     * @param   p1[3] xyz
     * @author  fulipeng (fulipengqd@yeah.net)
     * @date    2024-10-24
     */
    void setPoint2(Box* obj, QList<double> p2);

    /**
     * @brief   设置长宽高数据
     * @param   obj
     * @param   p1[3] Length Width Height
     * @author  fulipeng (fulipengqd@yeah.net)
     * @date    2024-10-24
     */
    void setDimensions(Box* obj, QList<double> dimensions);

    /**
     * @brief   设置两点数据
     * @param   obj
     * @param   p1[3] xyz
     * @param   p2[3] xyz
     * @author  fulipeng (fulipengqd@yeah.net)
     * @date    2024-10-24
     */
    void setPoints(Box* obj, QList<double> p1, QList<double> p2);

    /**
     * @brief   更新数据
     * @param   obj
     * @author  fulipeng (fulipengqd@yeah.net)
     * @date    2024-10-24
     */
    void update(Box* obj);

    /**
     * @brief   创建box
     * @return  Box
     * @author  fulipeng (fulipengqd@yeah.net)
     * @date    2024-10-24
     */
    Box* static_Box_Create();

private:

};


#endif
